﻿using System;
using System.Collections.Generic;
using System.Text;
using DCRF.Common.Core;
using DCRF.Common.Primitive;
using DCRF.Common.Interface;
using DCRF.Common.Attributes;

namespace DCRF.BaseComponents
{
    [BlockId("DummyBlock")]
    //[BlockConnector("TEST", typeof(int), typeof(string), "title")]
    [BlockComments("Some comments")]
    [BlockCompany("mahdix")]
    [BlockFriendlyName("Friend")]
    [BlockReleaseDate("121212")]
    public class DummyBlock: BlockBase
    {
        public DummyBlock(Guid id, IContainerBlockWeb parent)
            : base(id, parent)
        {
        }

        public override void InitBlock()
        {
            //Connectors["TEST"].AttachEndPoint(19);
        }

        [BlockService]
        public int DummyService1(int tickManagerId,int sercondvalue,int lastArgument)
        {
            if (tickManagerId == 10) throw new InvalidOperationException("Cannot accept 10");
            return tickManagerId + sercondvalue + lastArgument;
        }
    }
}
